#ifndef JBLEDITOR_H
#define JBLEDITOR_H

#include "app_guis.h"
#include <unordered_map>
#include <boost/bimap.hpp>
class JBLEditor : public JBLEditorUI
{
public:
    typedef std::unordered_map<std::wstring,std::wstring> wssmap_t;
    typedef std::unordered_map<std::wstring,JBLEditor*> wswmap_t;
    static JBLEditor* fromLSH(const std::wstring & lsh);
protected:
    std::wstring m_lsh;
    std::wstring m_tbname;

    wssmap_t m_brxx;
    static wswmap_t s_wswmap;
public:
    bool getBRXX(const std::wstring & key,std::wstring & value)const;
    std::wstring  getJSCodeBRXX()const;
    inline const std::wstring & getLsh()const {return m_lsh;}
    JBLEditor(wxWindow* parent,const std::wstring & lsh);
    virtual ~JBLEditor();
    virtual void OnBtnUpdate( wxCommandEvent& event );
    virtual void OnBtnTemplate( wxCommandEvent& event );
    virtual void OnTreeItemActivatedBL( wxTreeEvent& event );
public:
    void OnUpdateTree();

};


#endif // JBLEDITOR_H
